import React, {Component} from 'react';
import { getDeviceWisdomElectricityException } from '../service';
import styled from '../styled.less';
import { Ceil } from '@/components/Ceil';

export default class ElectricityHeaderRight extends Component {

  state = {
    residueCurrentValue: [],
    temperatureFour: [],
    temperatureOne: [],
    temperatureTwo: [],
    temperatureThree: []
  };

  componentWillMount() {
    getDeviceWisdomElectricityException()
  }

  render () {
    const { residueCurrentValue, temperatureOne, temperatureTwo, temperatureThree, temperatureFour } = this.state;
    return (
      <div className="head-left">
        <Ceil
          heads={['', '本日/次', '本周/次', '本月/次']}
          subHeads={['剩余电流值异常', "温度1", "温度2", "温度3", "温度4"]}
          data={[[...residueCurrentValue], [...temperatureOne], [...temperatureTwo], [...temperatureThree], [...temperatureFour]]}
        />
      </div>
    )
  }
}
